package server;

import java.rmi.Naming;

import server.controller.Universe3DControllerImpl;

import server.controller.Universe3DControllerRemoteInterface;

public class Server{

	public static String IPAdress = "ThoMacBook.local";
	public static String broadcastAdress = "224.98.13.67";
	public static int port = 1099;
	public static String serverName = "ServerUniverse";
	
	public Server() {
		try {
			java.rmi.registry.LocateRegistry.createRegistry(1099);
			Universe3DControllerRemoteInterface rm = new Universe3DControllerImpl();
			Naming.rebind("rmi://"+IPAdress+":"+port+"/"+serverName, rm);
			System.out.println("Creation du serveur: " + rm.getUniverseName());
		} catch (Exception e) {
			System.out.println("Trouble: " + e);
		}
	}
	
	public static void main(String[] args) {
        new Server();
    }
}
